package me.siphone.http.api;

import androidx.annotation.NonNull;
import com.hjq.http.config.IRequestApi;
import java.util.List;

public class QueryGroupApi implements IRequestApi {
    @NonNull
    @Override
    public String getApi() {
        return "/prod-api/interface/getUserDeptAndDevices";
    }

    /**
     * deptList.push({ 'id': dept.dept.deptId, 'name': dept.dept.deptName, 'devices':
     * dept.deviceList.map(device => { return { 'id': device.id, 'name': device.deviceName,
     * 'number': device.deviceUid, 'status': device.onlineStatus, } }) });
     */
    public static final class DeptObj {

        private Dept dept;
        private List<Device> deviceList;

        public Dept getDept() {
            return dept;
        }

        public List<Device> getDeviceList() {
            return deviceList;
        }

        public static final class Dept {
            private int deptId;
            private String deptName;

            public int getDeptId() {
                return deptId;
            }

            public String getDeptName() {
                return deptName;
            }
        }

        public static final class Device {
            private int id;
            private String deviceName;
            private String deviceUid;
            private int onlineStatus;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getDeviceName() {
                return deviceName;
            }

            public void setDeviceName(String deviceName) {
                this.deviceName = deviceName;
            }

            public String getDeviceUid() {
                return deviceUid;
            }

            public void setDeviceUid(String deviceUid) {
                this.deviceUid = deviceUid;
            }

            public int getOnlineStatus() {
                return onlineStatus;
            }

            public void setOnlineStatus(int onlineStatus) {
                this.onlineStatus = onlineStatus;
            }
        }
    }
}
